package server;

public class MachineEntry implements IMachineEntry {

	private int TaskAmount;
	
	private ConnectionInformation ConnInfo;
	
	private MachineState State;
	
//---------------------------------------------------------------------
	
	public MachineEntry(int taskAmount, ConnectionInformation connInfo, MachineState state) {
		super();
		TaskAmount = taskAmount;
		ConnInfo = connInfo;
		State = state;
	}
	
	
	public void decTaskCount() {
		// TODO Add exception if becomes negative
		TaskAmount--;
	}

	public ConnectionInformation getConnInfo() {
		return ConnInfo;
	}

	public MachineState getMachineState() {
		return State;
	}

	public int getTaskCount() {
		return TaskAmount;
	}

	public void incTaskCount() {
		TaskAmount++;
	}

	public void putConnInfo(ConnectionInformation Conn) {
		ConnInfo = Conn;
	}

	public void putMachineState(MachineState State) {
		this.State = State;
	}

}
